package com.Controller;

import com.Service.MessageService;
import com.Utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@CrossOrigin
@RestController
@RequestMapping("/Message")
public class MessageController {
    @Autowired
    private MessageService messageService;


    //查历史消息
    @PostMapping("/selectMessage")
    public R liaotian(@RequestBody Map<String, String> Map_All) {
        String sendertel=Map_All.get("sendertel");
        String recipienttel=Map_All.get("recipienttel");
        return new R(true,messageService.select(sendertel,recipienttel));
    }




}
